package org.tempuri;

public class ICrawlerWSProxy implements org.tempuri.ICrawlerWS {
  private String _endpoint = null;
  private org.tempuri.ICrawlerWS iCrawlerWS = null;
  
  public ICrawlerWSProxy() {
    _initICrawlerWSProxy();
  }
  
  public ICrawlerWSProxy(String endpoint) {
    _endpoint = endpoint;
    _initICrawlerWSProxy();
  }
  
  private void _initICrawlerWSProxy() {
    try {
      iCrawlerWS = (new org.tempuri.CrawlerWSLocator()).getBasicHttpBinding_ICrawlerWS();
      if (iCrawlerWS != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)iCrawlerWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)iCrawlerWS)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (iCrawlerWS != null)
      ((javax.xml.rpc.Stub)iCrawlerWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public org.tempuri.ICrawlerWS getICrawlerWS() {
    if (iCrawlerWS == null)
      _initICrawlerWSProxy();
    return iCrawlerWS;
  }
  
  public void createorUpdateRootUrl(java.lang.String url, java.lang.Boolean isValid) throws java.rmi.RemoteException{
    if (iCrawlerWS == null)
      _initICrawlerWSProxy();
    iCrawlerWS.createorUpdateRootUrl(url, isValid);
  }
  
  public void createorUpdateSublink(java.lang.String subUrl, java.lang.String parentUrl, java.lang.Boolean isValid) throws java.rmi.RemoteException{
    if (iCrawlerWS == null)
      _initICrawlerWSProxy();
    iCrawlerWS.createorUpdateSublink(subUrl, parentUrl, isValid);
  }
  
  public org.datacontract.schemas._2004._07.CrawlerWS.Sublink[] getRootSublinks(java.lang.String rootUrl) throws java.rmi.RemoteException{
    if (iCrawlerWS == null)
      _initICrawlerWSProxy();
    return iCrawlerWS.getRootSublinks(rootUrl);
  }
  
  public void createorUpdateExternalLink(java.lang.String rootUrl, java.lang.Boolean isValid, java.lang.String parentUrl) throws java.rmi.RemoteException{
    if (iCrawlerWS == null)
      _initICrawlerWSProxy();
    iCrawlerWS.createorUpdateExternalLink(rootUrl, isValid, parentUrl);
  }
  
  
}